package cz.su.pod.reservation.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;
import javax.persistence.Id;

@Entity
public class User {
	enum UserRole {ADMIN, USER, GRILL_MANAGER, DRUNK_ROOM_MANAGER, BEER_VEHICLE_MANAGER, DORMITORY_MANAGER}
	
	@Id private String uid;
	@Column(nullable = false) private String name;
	@Column(nullable = false) private String surname;
	@Column(nullable = false) private String email;
	@Column(nullable = false) private String block;
	@Column(nullable = false) private String room;
	@Enumerated @Column(nullable = false) private UserRole role;
	
	public User(String uid, String name, String surname, String email,
			String block, String room, UserRole role) {
		super();
		this.uid = uid;
		this.name = name;
		this.surname = surname;
		this.email = email;
		this.block = block;
		this.room = room;
		this.role = role;
	}
		
	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getBlock() {
		return block;
	}

	public void setBlock(String block) {
		this.block = block;
	}

	public String getRoom() {
		return room;
	}

	public void setRoom(String room) {
		this.room = room;
	}

	public UserRole getRole() {
		return role;
	}

	public void setRole(UserRole role) {
		this.role = role;
	}	
}
